#!/bin/bash
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

umask 002

repo=lab-$(awk '/^lab:\s/ {print $2; exit}' /etc/compass-ci/setup.yaml)

[ -d "/c/$repo/.git" ] || {
	mkdir -p /c/"$repo".git
	cd /c/"$repo".git
	git init --bare .
	git clone /c/"$repo".git  /c/"$repo"
}
